use $data/Table_9_1_Final.dta, replace
xtset apt timestamp 
xtgls lnenergy hour_temp post finpost healthpost ga_fin_1 ga_health_1 tt tt2 tt3 i.dayofweek i.hour i.apt, panels(h) corr(psar1) force
test finpost ga_fin_1
local ftest=round(`r(p)',.01)
test healthpost ga_health_1
local htest=round(`r(p)',.01)
outreg2 using $tables/Table_9, keep(hour_temp post finpost healthpost ga_fin_1 ga_health_1) label replace ///
	ctitle("ln(15 Minute kWh)") sortvar(mean_daily_temp hour_temp post finpost ga_fin_1 healthpost ga_health_1) addtext(Household Fixed Effects, Yes, P-value Health, `htest', P-value Financial, `ftest')  

use $data/Table_9_2_Final.dta, replace
xtset apt timestamp 
xtgls lnenergy hour_temp post finpost healthpost ga_fin_1 ga_health_1 tt tt2 tt3 i.dayofweek i.hour i.apt, panels(h) corr(psar1) force
test finpost ga_fin_1
local ftest=round(`r(p)',.01)
test healthpost ga_health_1
local htest=round(`r(p)',.01)
outreg2 using $tables/Table_9, keep(hour_temp post finpost healthpost ga_fin_1 ga_health_1) label append ///
	ctitle("ln(30 Minute kWh)") addtext(Household Fixed Effects, Yes, P-value Health, `htest', P-value Financial, `ftest')  

use $data/Table_9_3_Final.dta, replace
xtset apt timestamp 
xtgls lnenergy hour_temp post finpost healthpost ga_fin_1 ga_health_1 tt tt2 tt3 i.dayofweek i.hour i.apt, panels(h) corr(psar1) force
test finpost ga_fin_1
local ftest=round(`r(p)',.01)
test healthpost ga_health_1
local htest=round(`r(p)',.01)
outreg2 using $tables/Table_9, keep(hour_temp post finpost healthpost ga_fin_1 ga_health_1) label append ///
	ctitle("ln(Hourly kWh)") addtext(Household Fixed Effects, Yes, P-value Health, `htest', P-value Financial, `ftest')  
	
use $data/Table_9_4_Final.dta, replace
xtset apt timestamp 
xtgls lnenergy mean_daily_temp post finpost healthpost ga_fin_1 ga_health_1 tt tt2 tt3 i.dayofweek i.apt, panels(h) corr(psar1) force
test finpost ga_fin_1
local ftest=round(`r(p)',.01)
test healthpost ga_health_1
local htest=round(`r(p)',.01)
outreg2 using $tables/Table_9, keep(mean_daily_temp post finpost healthpost ga_fin_1 ga_health_1) label  ///
	ctitle("ln(Daily kWh)") addtext(Household Fixed Effects, Yes, P-value Health, `htest', P-value Financial, `ftest') ///
	sortvar(mean_daily_temp hour_temp post finpost ga_fin_1 healthpost  ga_health_1) append excel 
 
